package com.dplus.common.data;

import java.util.HashMap;

/**
 * 公用api数据对象
 * 
 * @ClassName: CommonApiModelMapExt
 * @Description: TODO （描述）
 * @author 作者 jacking
 * @date 2017年6月23日 下午3:29:01
 */
public class CommonApiModelMapExt extends HashMap<String, Object> {
	public final static String CODE = "code";
	public final static String MSG = "msg";
	public final static String INFO = "info";
	public final static String ERRMSG = "errmsg";
	public final static String ERRCODE = "errcode";
	/**
	 * 返回标识1：成功，其他失败
	 */
	private Integer code;//返回标识1：成功，其他失败
	/**
	 * 返回标识0：成功，其他失败
	 */
	private Integer errcode;
	/**
	 * 返回信息
	 */
	private String errmsg;
	/**
	 * 返回信息
	 */
	private String msg;
	/**
	 * 返回开发信息
	 */
	private String info;

	public CommonApiModelMapExt() {
	}

	/**
	 * @return the errcode
	 */
	public Integer getErrcode() {

		return super.get("errcode") == null ? errcode : Integer.parseInt(super.get("errcode").toString());
	}

	/**
	 * @param errcode
	 *            the errcode to set
	 */
	public void setErrcode(Integer errcode) {
		this.errcode = errcode;
		put("errcode", errcode);
	}

	/**
	 * @return the errmsg
	 */
	public String getErrmsg() {
		return super.get("errmsg") == null ? errmsg : super.get("errmsg").toString();
	}

	/**
	 * @param errmsg
	 *            the errmsg to set
	 */
	public void setErrmsg(String errmsg) {
		this.errmsg = errmsg;
		put("errmsg", errmsg);
	}

	/**
	 * @param code
	 *            the code to set
	 */
	public void setCode(Integer code) {
		this.code = code;
		put("code", code);
	}

	/**
	 * @return the msg
	 */
	public String getMsg() {
		return super.get("msg") == null ? msg : super.get("msg").toString();
	}

	/**
	 * @param msg
	 *            the msg to set
	 */
	public void setMsg(String msg) {
		this.msg = msg;
		put("msg", msg);
	}

	/**
	 * @return the info
	 */
	public String getInfo() {
		return super.get("info") == null ? info : super.get("info").toString();
	}

	/**
	 * @param info
	 *            the info to set
	 */
	public void setInfo(String info) {
		this.info = info;
		put("info", info);
	}

	/**
	 * @return the code
	 */
	public Integer getCode() {
		return  super.get("code") == null ? code : Integer.parseInt(super.get("code").toString());
	}

	/**
	 * @param code
	 * @param errcode
	 * @param errmsg
	 * @param msg
	 * @param info
	 */
	public CommonApiModelMapExt( Integer errcode, String errmsg, Integer code,String info, String msg) {
		this.code = code;
		this.errcode = errcode;
		this.errmsg = errmsg;
		this.msg = msg;
		this.info = info;
		
		put("code", code);
		put("errcode", errcode);
		put("errmsg", errmsg);
		put("msg", msg);
		put("info", info);
		 
	}
	public CommonApiModelMapExt( Integer errcode, String errmsg) {
		this.errcode = errcode;
		this.errmsg = errmsg;
		put("errcode", errcode);
		put("errmsg", errmsg);
	}
	
	

}
